//
//  ViewController.swift
//  C014_UIBezierPath
//
//  Created by yao_yu on 15/6/16.
//  Copyright © 2015年 yao_yu. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    

    var mainDraw:YYCircleView!
    

    override func viewDidLoad() {
        super.viewDidLoad()
        
        mainDraw = YYCircleView()
        mainDraw.backgroundColor = UIColor.clearColor()
        view.addSubview(mainDraw)

    }
    
    override func viewDidLayoutSubviews() {
        let cx = CGRectGetMidX(view.bounds)
        let cy = CGRectGetMidY(view.bounds)
        let pwidth:CGFloat = 200
        let pheight:CGFloat = 150
        mainDraw.frame = CGRectMake(cx - pwidth/2, cy - pheight / 2, pwidth, pheight)
    }
    
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

